﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace PlatformUW.EntityFramework.Migrations
{
    /// <inheritdoc />
    public partial class cm2 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("70315086-7738-4ee7-8ba9-6b9840100062"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("8c7884c5-c0f2-4c4d-829d-9c336671e5af"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("8f39eac9-0936-4462-ab2f-fdd917ac5771"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("b04ccd92-53f7-4034-bba3-f90181e6db7f"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("de2e818f-bef4-4921-865b-d0a90d0f2167"));

            migrationBuilder.DeleteData(
                table: "Players",
                keyColumn: "Id",
                keyValue: new Guid("d4aedb61-578c-4c2d-947d-ca098d7f08e8"));

            migrationBuilder.DeleteData(
                table: "Players",
                keyColumn: "Id",
                keyValue: new Guid("f5d4800b-feef-4bd7-a2d4-77581a75671d"));

            migrationBuilder.CreateTable(
                name: "Sensors",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Name = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Description = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Station = table.Column<int>(type: "int", nullable: false),
                    RO_Address = table.Column<int>(type: "int", nullable: false),
                    RO_Length = table.Column<int>(type: "int", nullable: false),
                    RW_Address = table.Column<int>(type: "int", nullable: false),
                    RW_Length = table.Column<int>(type: "int", nullable: false),
                    Enabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    PortCategory = table.Column<int>(type: "int", nullable: false),
                    Ip = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Port = table.Column<int>(type: "int", nullable: false),
                    localIp = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    localPort = table.Column<int>(type: "int", nullable: false),
                    COMn = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Baudrate = table.Column<int>(type: "int", nullable: false),
                    SerialParams = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Protocol = table.Column<int>(type: "int", nullable: false),
                    optSupport21Cmd = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    optSplit3_4Cmd = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Interval = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sensors", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "Players",
                columns: new[] { "Id", "Account", "AccountType", "DateCreated" },
                values: new object[,]
                {
                    { new Guid("197d9733-480f-4650-a175-300e8bf583b6"), "LiShi", "Free", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2188) },
                    { new Guid("f0824385-276f-4809-9236-b41810e7c590"), "ZhangSan", "Free", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2176) }
                });

            migrationBuilder.InsertData(
                table: "Sensors",
                columns: new[] { "Id", "Baudrate", "COMn", "Description", "Enabled", "Interval", "Ip", "Name", "Port", "PortCategory", "Protocol", "RO_Address", "RO_Length", "RW_Address", "RW_Length", "SerialParams", "Station", "localIp", "localPort", "optSplit3_4Cmd", "optSupport21Cmd" },
                values: new object[,]
                {
                    { new Guid("03335e02-a170-4de3-9ce4-767a90ae7cab"), 0, null, "Temperature Sensor", true, 0, "192.168.1.100", "Temperature", 5000, 0, 0, 1, 10, 100, 10, null, 1, null, 0, false, false },
                    { new Guid("33587450-d724-48ee-aa52-b6e48ead29bd"), 0, null, "Depth Sensor", true, 0, "192.168.1.101", "Depth", 5001, 0, 3, 1, 10, 0, 0, null, 1, null, 0, false, false },
                    { new Guid("77cd269e-efa2-4c35-b62d-4f262d9c1b34"), 0, null, "Humidity Sensor", true, 0, "192.168.1.100", "Humidity", 5000, 0, 0, 1, 10, 100, 10, null, 2, null, 0, false, false },
                    { new Guid("c5ea5f48-5f0d-4fa7-9d8c-813949f3a124"), 0, null, "Alitute Sensor", true, 0, "192.168.1.100", "Alitute", 5001, 0, 0, 1, 10, 100, 10, null, 1, null, 0, false, false }
                });

            migrationBuilder.InsertData(
                table: "Characters",
                columns: new[] { "Id", "Classes", "DateCreated", "Level", "NickName", "PlayerId" },
                values: new object[,]
                {
                    { new Guid("372a0556-862c-45b6-aecd-cbe48ae45960"), "Palain", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2860), 99, "Superman", new Guid("197d9733-480f-4650-a175-300e8bf583b6") },
                    { new Guid("41f58b4d-a73c-400e-b812-aa7b527bb506"), "Warrior", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2855), 90, "Iron Man", new Guid("f0824385-276f-4809-9236-b41810e7c590") },
                    { new Guid("47261fef-788d-461a-8b52-4c9bb9128fef"), "Mage", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2846), 99, "Code Man", new Guid("f0824385-276f-4809-9236-b41810e7c590") },
                    { new Guid("5838bee1-7b4d-4317-a918-1e2faa7408a0"), "Druid", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2857), 80, "Spider Man", new Guid("f0824385-276f-4809-9236-b41810e7c590") },
                    { new Guid("bfe68639-38e4-42c2-9432-490c41994db4"), "Death Knight", new DateTime(2025, 6, 8, 14, 27, 14, 416, DateTimeKind.Local).AddTicks(2858), 90, "Batman", new Guid("197d9733-480f-4650-a175-300e8bf583b6") }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Sensors");

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("372a0556-862c-45b6-aecd-cbe48ae45960"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("41f58b4d-a73c-400e-b812-aa7b527bb506"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("47261fef-788d-461a-8b52-4c9bb9128fef"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("5838bee1-7b4d-4317-a918-1e2faa7408a0"));

            migrationBuilder.DeleteData(
                table: "Characters",
                keyColumn: "Id",
                keyValue: new Guid("bfe68639-38e4-42c2-9432-490c41994db4"));

            migrationBuilder.DeleteData(
                table: "Players",
                keyColumn: "Id",
                keyValue: new Guid("197d9733-480f-4650-a175-300e8bf583b6"));

            migrationBuilder.DeleteData(
                table: "Players",
                keyColumn: "Id",
                keyValue: new Guid("f0824385-276f-4809-9236-b41810e7c590"));

            migrationBuilder.InsertData(
                table: "Players",
                columns: new[] { "Id", "Account", "AccountType", "DateCreated" },
                values: new object[,]
                {
                    { new Guid("d4aedb61-578c-4c2d-947d-ca098d7f08e8"), "LiShi", "Free", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2041) },
                    { new Guid("f5d4800b-feef-4bd7-a2d4-77581a75671d"), "ZhangSan", "Free", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2033) }
                });

            migrationBuilder.InsertData(
                table: "Characters",
                columns: new[] { "Id", "Classes", "DateCreated", "Level", "NickName", "PlayerId" },
                values: new object[,]
                {
                    { new Guid("70315086-7738-4ee7-8ba9-6b9840100062"), "Palain", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2667), 99, "Superman", new Guid("d4aedb61-578c-4c2d-947d-ca098d7f08e8") },
                    { new Guid("8c7884c5-c0f2-4c4d-829d-9c336671e5af"), "Death Knight", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2665), 90, "Batman", new Guid("d4aedb61-578c-4c2d-947d-ca098d7f08e8") },
                    { new Guid("8f39eac9-0936-4462-ab2f-fdd917ac5771"), "Mage", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2659), 99, "Code Man", new Guid("f5d4800b-feef-4bd7-a2d4-77581a75671d") },
                    { new Guid("b04ccd92-53f7-4034-bba3-f90181e6db7f"), "Druid", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2664), 80, "Spider Man", new Guid("f5d4800b-feef-4bd7-a2d4-77581a75671d") },
                    { new Guid("de2e818f-bef4-4921-865b-d0a90d0f2167"), "Warrior", new DateTime(2025, 6, 4, 15, 30, 51, 156, DateTimeKind.Local).AddTicks(2662), 90, "Iron Man", new Guid("f5d4800b-feef-4bd7-a2d4-77581a75671d") }
                });
        }
    }
}
